{% extends "admin_base.html" %}

{% block head %}
    {{ super() }}
{% endblock %}

{% block body_left %}
    {{ super() }}
{% endblock %}

{% block body_right %}
    <div class="right_container">
        <div class="right_layout">
            <label>博客标题</label>
            <div class="blog_info">
                <input id='title' class="text_input" type="text" name="title" value="{{ blog.title }}"/>
                <div class="btn_layout">
                    <select id="category" value="{{ blog.category }}">
                        {% for cate in categories %}
                        <option value="{{ cate.name }}">{{ cate.name }}</option>
                        {% endfor %}
                    </select>
                    <span>置顶</span><input id="is_top" type="checkbox" name="is_top" value="{{ blog.is_top }}">
                    <span>私有</span><input id="is_share" type="checkbox" name="is_share" value="{{ blog.is_share }}">
                </div>
            </div>
            <label>博客摘要</label><textarea id="brief" class="text_input" type="text" name="brief" >{{ blog.brief }}</textarea>
            <label>博客标签</label><input id="tags" class="text_input" type="text" name="tags" value="{{ blog.tags }}"/>
            <label>博客正文</label>
            <div class="editor_container">
                <button class="setting_btn" onclick="admin.set_editor_fullscreen()">全屏</button>
                <pre id="editor">{{ blog.content }}</pre>
            </div>
            <div class="spacer"></div>
            <label>HTML代码</label><textarea id='html_code' class="text_input" type="text" name="html_code" >{{ blog.html_code }}</textarea>
            <div class="spacer"></div>
        </div>
    </div>
{% endblock %}
